package com.door.erp.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 生产单
 * @author yangxuelin
 */
@Entity
@Table(name = "outputorder", catalog = "door")
public class OutputOrder implements Serializable {
	
	private static final long serialVersionUID = 146824521478703347L;

	private long id;
	
	private String outputOrderNo;
	
	private Product product;
	
	private Orders orders;
	
	private String color;
	
	/**
	 * 门扇
	 */
	private DoorLeaf doorLeaf;
	
	/**
	 *  线型 ：实木，卡口，平口
	 */
	private LineShape lineShape;
	
	/**
	 * 门套
	 */
	private DoorFrame doorframe;
	
	private OutputStatus outputStatus;
	
	private Date createTime;
	
	private String remark;

	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@OneToOne
	@JoinColumn(name="productId", nullable=false)
	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	@ManyToOne
	@JoinColumn(name = "orderId", nullable=false)
	public Orders getOrders() {
		return orders;
	}

	public void setOrders(Orders orders) {
		this.orders = orders;
	}

	@Column(name="color", nullable=false)
	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}
	
	@Column(name="outputOrderNo", nullable=false)
	public String getOutputOrderNo() {
		return outputOrderNo;
	}

	public void setOutputOrderNo(String outputOrderNo) {
		this.outputOrderNo = outputOrderNo;
	}

	@OneToOne
	@JoinColumn(name="outputstatus_id",nullable=false)
	public OutputStatus getOutputStatus() {
		return outputStatus;
	}

	public void setOutputStatus(OutputStatus outputStatus) {
		this.outputStatus = outputStatus;
	}

	@Column(name="createTime", nullable=false, updatable=false)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name="remark")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@OneToOne()
	@JoinColumn(name="doorLeafId")
	public DoorLeaf getDoorLeaf() {
		return doorLeaf;
	}

	public void setDoorLeaf(DoorLeaf doorLeaf) {
		this.doorLeaf = doorLeaf;
	}

	@OneToOne()
	@JoinColumn(name="lineShapeId")
	public LineShape getLineShape() {
		return lineShape;
	}

	public void setLineShape(LineShape lineShape) {
		this.lineShape = lineShape;
	}

	@OneToOne()
	@JoinColumn(name="doorFrameId")
	public DoorFrame getDoorframe() {
		return doorframe;
	}

	public void setDoorframe(DoorFrame doorframe) {
		this.doorframe = doorframe;
	}
	
	

}
